import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from "@/views/LoginView";
import FindView from "@/views/FindView";
import RegisterView from "@/views/RegisterView";
import MainView from "@/views/MainView";
import PaySuccess from "@/views/PaySuccessView";
import ShopCarView from "@/views/ShopCarView";
import EatView from "@/views/EatView";
import SortView from "@/views/SortView";
import PayView from "@/views/PayView";
import PayForView from "@/views/PayForView";
import RemarksView from "@/views/RemarksView";
import FirstView from "@/views/FirstView";
import MyView from "@/views/MyView";
import OrderView from "@/views/OrderView";
import BuyFoodView from "@/views/BuyFoodView";

import SearchView from "@/views/SearchView";
import Search1View from "@/views/Search1View";
const routes = [
  {
    path: '/main',
    name: 'main',
    component: MainView,
    meta:{
      TabBarShow: false,
    }
  },{
    path: '/home',
    name: 'home',
    component: HomeView,
    meta:{
      TabBarShow: true,
    }
  },{
    path: '/login',
    name: 'login',
    component: LoginView,
    meta:{
      TabBarShow: false,
    }
  }, {
    path: '/pay',
    name: 'pay',
    component: PayView
  },
  {
    path: '/payfor',
    name: 'payfor',
    component: PayForView
  },{
    path: '/findPass',
    name: 'findPass',
    component: FindView,
    meta:{
      TabBarShow: false,
    }
  },{
    path: '/register',
    name: 'register',
    component: RegisterView,
    meta:{
      TabBarShow: false,
    }
  },
  {
    path: '/search',
    name: 'search',
    component: SearchView,
    meta:{
      TabBarShow: false,
    }
  },
  {
    path: '/search1',
    name: 'search1',
    component: Search1View,
    meta:{
      TabBarShow: false,
    }
  },
  {
    path: '/my',
    name: 'my',
    component: MyView,
    meta:{
      TabBarShow: true,
    }
  },
  {
    path: '/order',
    name: 'order',
    component: OrderView,
    meta:{
      TabBarShow: false,
    }
  },{
    path: '/remarks',
    name: 'remarks',
    component: RemarksView,
    meta:{
      TabBarShow: false,
    }
  },{
    path: '/first',
    name: 'first',
    component: FirstView,
    meta:{
      TabBarShow: true,
    }
  },
  {
    path: '/sort',
    name: 'sort',
    component: SortView,
    meta:{
      TabBarShow: true,
    }
  },
  {
    path: '/shopCar',
    name: 'shopCar',
    component: ShopCarView,
    meta:{
      TabBarShow: true,
    }
  },{
  },
  {
    path: '/eat',
    name: 'eat',
    component: EatView,
    meta:{
      TabBarShow: true,
    }
  },
  {
    path: '/paysuccess',
    name: 'paysuccess',
    component: PaySuccess
  },
  {
    path: '/buyfood',
    name: 'buyfood',
    component: BuyFoodView
  },
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
